﻿using SangaiTech.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SangaiTech.Core.DomainServices
{
    public class EmployeeService:IEmployeeService
    {
        private readonly IEmployeeRepository _employeeRepository;
        public EmployeeService(IEmployeeRepository employeeRepository)
        {
            _employeeRepository = employeeRepository;
        }

        public IEnumerable<Employee> GetAllRetiredEmployees()
        {
            var result = _employeeRepository.All().Where(e => e.IsRetired==true);
            return result;
        }
    }
}
